/*
** CENTER.C: Displays a message centered on the screen.
*/

#include <string.h>
#include <pictor.h>

char *msg = "Hello, from the PICTOR library!";

void main()
{
   VIDEOSTRUCT vstruct;

   /* initialize library */
   initvideo();
   getvconfig(&vstruct);

   vcolor(foreback(BOLD+WHITE,BLUE));
   cls();

   setvpos(center(1,vstruct.rows),
      center(strlen(msg),vstruct.columns));
   vputs(msg);
   kbdread();

   /* restore screen */
   vcolor(foreback(WHITE,BLACK));
   cls();
}
